package com.work.example.demo5.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.work.example.demo5.domain.BooksEntity;
import com.work.example.demo5.domain.formEntity;
import com.work.example.demo5.domain.vo.BookEntityVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BookMapper extends BaseMapper<BooksEntity> {
    List<BookEntityVo> queryByForm(@Param("name") String name,
                                   @Param("authorsList") List<String> authorsList,
                                   @Param("pressesList") List<String> pressesList,
                                   @Param("categoriesList") List<String> categoriesList,
                                   @Param("returnedList") List<String> returnedList
    );

    List<BookEntityVo> getAllList();
    Long  getIdByName(@Param("name") String name);

    void changebookstatus(Long bookId);

    void removebook(Long bookId);

    void savebook(BooksEntity booksEntity);

    void updatebook(BooksEntity booksEntity);
}
